The video conversion technology is widely applied in scenarios such as video broadcast transcoding, video surveillance, digital media adapters, and high-definition video conferences. Video conversion refers to converting a compressed and coded video code stream into another video code stream, so as to adapt to a different network bandwidth, a different terminal processing capability, a different user requirement, and the like.
In one of current video conversion methods, different resolutions are preset for different bit rates. For example, a resolution of 320*240 is corresponding to a bit rate of 100000 bit/s. For another example, a resolution of 640*480 is corresponding to a bit rate of 120000 bit/s, and so on. In video conversion, a bit rate corresponding to a resolution can be learnt according to a resolution that is to be obtained after the conversion. When a video is output, the bit rate corresponding to the resolution may be used as an output bit rate. In addition, there is also another video conversion method, which classifies output bit rates into several levels according to an actual requirement. For example, at a first level, an output bit rate is 90% of an input bit rate; at a second level, an output bit rate is 80% of an input bit rate, and so on. Then in video conversion, an output bit rate is selected by selecting a different level according to an actual requirement, for example, in a situation in which transmission bandwidths are different.
In an implementation process of embodiments of the present invention, the inventor finds that the prior art has at least the following problem. According to a video conversion method in the prior art, video conversion is performed by using a fixed relationship between a resolution and a bit rate or a fixed relationship between a transmission bandwidth and a bit rate, which cannot ensure target video quality after the video conversion, thereby affecting user experience.